﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Promocao>" %>
<%@ Import Namespace="TogheterWeBuyIt.Models"%>

<table width="100%" align="center">
    <tr>
        <td colspan="3" align="center">Comentários</td>
    </tr>
    <tr>
        <th style="text-align:center">Usuário</th>
        <th style="text-align:center">Comentário</th>
        <th style="text-align:center">Data</th>
    </tr>
    <%
        if (Model.ComentariosPromocaos != null)
        {
            foreach (var item in Model.ComentariosPromocaos)
            { %>
        <tr>
            <td align="center">
                <%= Html.ActionLink(item.Usuario.Login, "Details", "Usuario", new { id = item.IdUsuario }, null) %>
            </td>
            <td align="center">
                <%= Html.Encode(item.Texto) %>
            </td>
            <td align="center">
                <%= Html.Encode(item.Data.ToString("dd/MM/yyyy")) %>
            </td>
        </tr>       
	    <% }
        }%>
    
</table>